<div class="shell">
    <h1>书架</h1>
    <input #categoryName placeholder="请输入目录名称" />
    <button (click)='addCategory(categoryName)'>添加类目</button>
    <ul>
        <li *ngFor='let category of categories' [class.selected]='category.id==selectedCategory' class="flex space-between">
            <a routerLink='/category/{{category.id}}' (click)='useThisCategory(category.id)'>{{category.name}}</a><button (click)='delCategory(category.id)'>删除</button>
        </li>
    </ul>
</div>
<router-outlet></router-outlet>
<!-- <app-book-list [books]='books'></app-book-list> -->